const phoneBox = {
  namespaced: true,
  state: {
    //设备连接
    equipment:{
      status:false
    },
    //客户端连接
    connect:{
      status:false
    },
    //客户信息
    customer:{},
    //拨打电话状态
    call:{
      call_type:'select',
      visible:false,
      value:'',
      call_state:'',
    }
  },
  mutations: {
    setEquipment(state, status) { //设置设备连接状态
      state.equipment.status = status
    },
    setConnect(state, status) { //设置客户端连接状态
      state.connect.status = status
    },
    setCustomer(state, customer) { //设置电话盒子客户信息
      state.customer = customer
    },
    setCallState(state, call_state) { //通话状态
      state.call.call_state = call_state
    },
    setCall(state, type) { //拨打电话方式
      state.call.call_type = type
    },
    setCallVisible(state, visible) { //是否显示电话弹窗
      state.call.visible = visible
    },
    setCallValue(state, value) { //拨打电话值
      state.call.value = value
    },

  },
  actions: {

  }
}

export default phoneBox
